import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

import org.apache.commons.lang.StringUtils;

import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;


public class MainApp {

	public static void main(String[] args) throws IOException {
		try {
			File file = new File("D:\\qipengfei\\persional\\学生签约平台\\test.xls");
	        //读取表格  
			Workbook workbook = Workbook.getWorkbook(file);
			Sheet sheet = workbook.getSheet(0);
			int totalRows = sheet.getRows();
			System.out.println(totalRows);
			for (int i = 0; i < totalRows; i++) {
				Cell[] cells = sheet.getRow(i);
				StringBuilder line = new StringBuilder();
				for (Cell cell : cells) {
					String content = cell.getContents();
					line.append(content).append(" ");
				}
				System.out.println(line.toString());
			}
		} catch (Exception e) {
			
		}
		String studentId = "23454354354232";
		System.out.println();
        
	}

}
